--- external/stylegan/training/networks_stylegan3_sky.py	2023-03-09 18:10:40.036892930 +0000
+++ external_reference/stylegan/training/networks_stylegan3_sky.py	2023-03-09 18:07:58.562065004 +0000
@@ -642,6 +642,7 @@
         z_dim,                      # Input latent (Z) dimensionality.
         c_dim,                      # Conditioning label (C) dimensionality.
         w_dim,                      # Intermediate latent (W) dimensionality.
+        enc_dim, # encoder dimension
         img_resolution,             # Output resolution.
         img_channels,               # Number of output color channels.
         mapping_kwargs       = {},  # Arguments for MappingNetwork.
@@ -653,12 +654,13 @@
         self.z_dim = z_dim
         self.c_dim = c_dim
         self.w_dim = w_dim
+        self.enc_dim = enc_dim
         self.img_resolution = img_resolution
         self.img_channels = img_channels
         self.training_mode = training_mode
         self.scale_mapping_kwargs = scale_mapping_kwargs
         use_scale_affine = True if 'patch' in self.training_mode else False # add affine layer on style input
-        self.synthesis = SynthesisNetwork(w_dim=w_dim, img_resolution=img_resolution, img_channels=img_channels,
+        self.synthesis = SynthesisNetwork(w_dim=w_dim+enc_dim, img_resolution=img_resolution, img_channels=img_channels,
                                           training_mode=training_mode, use_scale_affine=use_scale_affine,
                                           **synthesis_kwargs)
         self.num_ws = self.synthesis.num_ws
